package java_thinking.unit_21.Exercise.Lock;

/**
 * @Desc:
 * @author: cww
 * @DateTime: 2020-04-04 20:22
 */

public class TestSyncLock {
    public static synchronized String testStatic(){
        return "abc";
    }
    public synchronized void test(){
        System.out.println("abc");
    }
}

/**
 javap -p -v -c TestSyncLock.class

 Classfile /C:/Code/spring-root/src/maindemo/java/java_thinking/unit_21/Exercise/Lock/TestSyncLock.class
 Last modified 2020-4-4; size 509 bytes
 MD5 checksum cc51bb9235b4e685ffd888928a0433be
 Compiled from "TestSyncLock.java"
 public class java_thinking.unit_21.Exercise.Lock.TestSyncLock
 minor version: 0
 major version: 52
 flags: ACC_PUBLIC, ACC_SUPER
 Constant pool:
 #1 = Methodref          #6.#16         // java/lang/Object."<init>":()V
 #2 = String             #17            // abc
 #3 = Fieldref           #18.#19        // java/lang/System.out:Ljava/io/PrintStream;
 #4 = Methodref          #20.#21        // java/io/PrintStream.println:(Ljava/lang/String;)V
 #5 = Class              #22            // java_thinking/unit_21/Exercise/Lock/TestSyncLock
 #6 = Class              #23            // java/lang/Object
 #7 = Utf8               <init>
 #8 = Utf8               ()V
 #9 = Utf8               Code
 #10 = Utf8               LineNumberTable
 #11 = Utf8               testStatic
 #12 = Utf8               ()Ljava/lang/String;
 #13 = Utf8               test
 #14 = Utf8               SourceFile
 #15 = Utf8               TestSyncLock.java
 #16 = NameAndType        #7:#8          // "<init>":()V
 #17 = Utf8               abc
 #18 = Class              #24            // java/lang/System
 #19 = NameAndType        #25:#26        // out:Ljava/io/PrintStream;
 #20 = Class              #27            // java/io/PrintStream
 #21 = NameAndType        #28:#29        // println:(Ljava/lang/String;)V
 #22 = Utf8               java_thinking/unit_21/Exercise/Lock/TestSyncLock
 #23 = Utf8               java/lang/Object
 #24 = Utf8               java/lang/System
 #25 = Utf8               out
 #26 = Utf8               Ljava/io/PrintStream;
 #27 = Utf8               java/io/PrintStream
 #28 = Utf8               println
 #29 = Utf8               (Ljava/lang/String;)V
 {
 public java_thinking.unit_21.Exercise.Lock.TestSyncLock();
 descriptor: ()V
 flags: ACC_PUBLIC
 Code:
 stack=1, locals=1, args_size=1
 0: aload_0
 1: invokespecial #1                  // Method java/lang/Object."<init>":()V
 4: return
 LineNumberTable:
 line 9: 0

 public static synchronized java.lang.String testStatic();
 descriptor: ()Ljava/lang/String;
 flags: ACC_PUBLIC, ACC_STATIC, ACC_SYNCHRONIZED
 Code:
 stack=1, locals=0, args_size=0
 0: ldc           #2                  // String abc
 2: areturn
 LineNumberTable:
 line 11: 0

 public synchronized void test();
 descriptor: ()V
 flags: ACC_PUBLIC, ACC_SYNCHRONIZED
 Code:
 stack=2, locals=1, args_size=1
 0: getstatic     #3                  // Field java/lang/System.out:Ljava/io/PrintStream;
 3: ldc           #2                  // String abc
 5: invokevirtual #4                  // Method java/io/PrintStream.println:(Ljava/lang/String;)V
 8: return
 LineNumberTable:
 line 14: 0
 line 15: 8
 }
 SourceFile: "TestSyncLock.java"





 */